package com.itheima.excel.dao;

import com.itheima.domain.Student;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.util.ArrayList;

public class ExcelDaoImpl implements IExcelDao {

    @Override
    public ArrayList<Student> getlist() throws IOException, ClassNotFoundException {

        ObjectInputStream ois = new ObjectInputStream(new FileInputStream("system\\message\\StudentMessage.txt"));
        Object o = ois.readObject();
        ArrayList<Student> students = (ArrayList<Student>) o;
        ois.close();
        return students;

    }
}
